<template>
	<div>
		NewsContent组件
		<br>
		<br>
		<button @click="goHome">js跳转路由-跳转到home组件</button>

	</div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
	data() {
		return {

		}
	}, mounted() {
		// this.$route.params 获取动态路由的传值
		// console.log(this.$route.params)

		// this.$route.query 获取get传值
		// console.log(this.$route.query)
	}, methods: {
		goHome() {
			//js跳转路由
			this.$router.push({
				path: '/home'
			})
		}
	}

});
</script>

<style lang="scss"></style>